{{ '<?php' }}

namespace {{ namespace }};

use Seeder;
use DB;

class {{ model_class }}Seeder extends Seeder {

    public function run()
    {
{% if fixture|length %}
    	// Uncomment the below to wipe the table clean before populating
    	DB::table('{{ table_name }}')->delete();

        $seeds = array(
{% for seed in fixture %}
            array(
    {%- for column in columns|keys -%}
        "{{ column }}" => "{{ seed[column] is defined ? seed[column]|e : null }}",
    {%- endfor %}{% if timestamps %} "created_at" => date("Y-m-d H:i:s"), "updated_at" => date("Y-m-d H:i:s"),{% endif %}) ,
{% endfor %}
        );
        // Uncomment the below to run the seeder
        DB::table('{{ table_name }}')->insert($seeds);
{% endif %}
    }
}